package ControlLayer;
import  ModelLayer.*;
import java.util.*;

/**
 * Write a description of class AddressCtr here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class AddressCtr
{
    // instance variables - replace the example below with your own
    private AddressBook addressBook;
   
    public AddressCtr()
    {
        addressBook=AddressBook.getInstance();
    }

    public boolean checkID(int id)
    {
        return addressBook.checkID(id);
    }
    
    public int readSize()
    {
        return addressBook.readSize();
    }
    
    public void addPerson(int id, String name, String address, int postalCode, String city, String phone)
    {
        addressBook.addPerson(id, name, address, postalCode, city, phone);
    }
    
    public void printPersons()
    {
        addressBook.printPersons();
    }
    
    public void printPerson(int id)
    {
        addressBook.printPerson(id);
    }
    
    public void removePerson(int id)
    {
        addressBook.removePerson(id);   
    }
    
     public void updatePersonID(int id,int newID)
    {
        addressBook.updatePersonID(id,newID);
    }
    
    public void updatePersonName(int id,String name)
    {
        addressBook.updatePersonName(id,name);
    }
    
    public void updatePersonAddress(int id,String address)
    {
        addressBook.updatePersonAddress(id,address);
    }
    
    public void updatePersonPostalCode(int id,int postalCode)
    {
        addressBook.updatePersonPostalCode(id,postalCode);
    }
    
    public void updatePersonCity(int id,String city)
    {
        addressBook.updatePersonCity(id,city);
    }
    
    public void updatePersonPhone(int id,String phone)
    {
        addressBook.updatePersonPhone(id,phone);
    }
    
    
}
